<extend name="zh_tw:Public:base" />
<block name="title">
    <title>美住 - 客棧管理</title>
</block>
<block name="extendHead">
    <link rel="stylesheet" type="text/css" href="/Public/dist/Home/common_control.css?rev=64d1945d31e576a17fc394f2ae2f098d">
    <link rel="stylesheet" type="text/css" href="/Public/dist/Home/RoomPage/index.css?rev=b0b2b5d5e9ba91bcfa75c4ecbef7542d">
    <link rel="stylesheet" type="text/css" media="all" href="__PUBLIC__/jslib/bootstrap-daterangepicker/daterangepicker.css" />
</block>
<block name="document">
    <div id="doc" class="container-above-md" data-today="{:date('Y-m-d')}" data-tomorrow="{:date('Y-m-d',strtotime('+1 days'))}">
        <include file="zh_tw:Public:Include_control_navbar" navbar-menu-setting="active" />
        <div id="doc-body" class="row">
            <include file="zh_tw:Public:Include_setting_side" doc-side-hotel="active" />
            <div id="doc-center" style="padding-bottom: 25px;">
                <div class="btn-group" id="tabSwitchGroup" style="margin-bottom: 25px;">
                    <a class="btn btn-raised btn-primary room-tab-index">間夜房</a>
                    <a class="btn btn-raised room-tab-hour">鐘點房</a>
                    <a class="btn btn-raised room-tab-long">長租房</a>
                </div>
                <div class="content-panel" id="room-index" style="margin-top: 0px;padding-bottom: 16px;">
                    <div class="content-panel-header">
                        <div class="content-panel-title">間夜房</div>
                        <div class="content-panel-operation">
                            <notempty name="currentHotel">
                                <div class="btn-raised btn-sm btn-primary" data-toggle="modal" data-target="#addModal">添加房型</div>
                            </notempty>
                        </div>
                    </div>
                    <div class="content-panel-body">
                        <empty name="currentHotel">
                            <empty name="navbarHotels">
                                <div class="content-panel-empty vertical-middle-block sm-height typo-body-1">
                                    <div class="vertical-middle-block-cell">您還未創建任何客棧</div>
                                </div>
                            <else/>
                                <div class="content-panel-empty vertical-middle-block sm-height typo-body-1">
                                    <div class="vertical-middle-block-cell">無已啟用的客棧</div>
                                </div>
                            </empty>
                        <else/>
                            <div class="content-panel-help">同步房間後可使用鎖掌櫃授權的二維碼房卡發放，自助快捷入住</div>
                            <notempty name="rooms">
                                <table class="table content-panel-table">
                                    <thead>
                                        <tr>
                                            <th>房型名稱</th>
                                            <th>房間號</th>
                                            <th>默認價格</th>
                                            <if condition = "$isPayUclbrt eq true or $isFreeHotel eq true">
                                                <th>義賣價格</th>
                                            </else>
                                            </if>
                                            <th>間數</th>
                                            <th>操作</th>
                                        </tr>
                                    </thead>
                                    <tbody id="roomTypeList">
                                        <volist name="rooms" id="room">
                                            <tr data-value='{$room.id}'>
                                                <td class="col-xs-2"><span class="roomTypeName">{$room.name}</span></td>
                                                <td class="col-xs-5 roomNumbers" data-roomnumber='{$room.roomNames}'>
                                                    <volist name="room.room" id="roomItem">
                                                        <div class="roomNameTag" data-value="{$roomItem.id}" data-syn="{$roomItem.roomfrom}">{$roomItem.name}</div>
                                                    </volist>
                                                </td>
                                                <td class="col-xs-1">{$hotelDefaultSymbol}<span class="roomTypePrice">{$room.price}</span></td>
                                                <if condition = "$isPayUclbrt eq true or $isFreeHotel eq true">
                                                   <td class="col-xs-1">{$hotelDefaultSymbol}<span class="roomTypeCharityPrice">{$room.charityprice}</span></td>
                                                </else>
                                                </if>
                                                <td class="col-xs-1">{:count($room['room'])}間</td>
                                                <td class="col-xs-3" data-type="{$room.name}" data-num="{$room.roomData}">
                                                	<div class="btn-link priceCalendar" >預設價格</div>
                                                    <div class="btn-link editRoomBtn" data-toggle="modal" data-target="#editModal">修改</div>
                                                    <div class="btn-link deleteRoomBtn" data-toggle="modal" data-target="#deleteModal">刪除</div>
                                                </td>
                                            </tr>
                                        </volist>
                                    </tbody>
                                </table>
                                <else/>
                                <div class="content-panel-empty vertical-middle-block sm-height typo-body-1">
                                    <div class="vertical-middle-block-cell">您還未添加任何房型</div>
                                </div>
                            </notempty>
                        </empty>
                    </div>
                </div>
                <div class="content-panel hidden" id="room-hour" style="margin-top: 0px;padding-bottom: 16px;">
                    <div class="content-panel-header">
                        <div class="content-panel-title">鐘點房
                        </div>
                        <div class="content-panel-operation">
                            <notempty name="currentHotel">
                                <div class="btn-raised btn-sm btn-primary" data-toggle="modal" data-target="#addHourRoomModal">添加鐘點房</div>
                            </notempty>
                        </div>
                    </div>
                    <div class="content-panel-body">           
                        <div class="content-panel-help" id="hour-room-info"></div>
                        <table class="table content-panel-table">
                            <thead>
                                <tr>
                                    <th>房型名稱</th>
                                    <th>房間號</th>
                                    <th>2小時</th>
                                    <th>4小時</th>
                                    <th>6小時</th>
                                    <th>間數</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody id="hourRoomList">
                            </tbody>
                        </table>
                        <div id="hourRoomListBodyEmpty" class="typo-text-black-light typo-subhead hidden">尚未添加鐘點房</div>
                    </div>
                </div>
                <div class="content-panel hidden" id="room-long" style="margin-top: 0px;padding-bottom: 16px;">
                    <div class="content-panel-header">
                        <div class="content-panel-title">長租房
                        </div>
                        <div class="content-panel-operation">
                            <notempty name="currentHotel">
                                <div class="btn-raised btn-sm btn-primary" data-toggle="modal" data-target="#addLongRoomModal">添加長租房</div>
                            </notempty>
                        </div>
                    </div>
                    <div class="content-panel-body">
                        <div class="content-panel-help">長租房最多能住7個月</div>
                        <table class="table content-panel-table">
                            <thead>
                                <tr>
                                    <th>房型名稱</th>
                                    <th>房間號</th>
                                    <th>價格({$hotelDefaultSymbol}/月)</th>
                                    <th>間數</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody id="longRoomList">
                            </tbody>
                        </table>
                        <div id="longRoomListBodyEmpty" class="typo-text-black-light typo-subhead hidden">尚未添加長租房</div>
                    </div>
                </div>
                <div class="content-panel" id="content-panel-show" style="margin-top: 10px;padding-bottom: 16px">
                    <div class="content-panel-header">
                        <div class="content-panel-title">客棧</div>
                        <div class="content-panel-operation">
                            <div class="btn-raised btn-sm btn-primary" data-toggle="modal" data-target="#addHotelModal">添加客棧</div>
                        </div>
                    </div>                        
                    <div class="content-panel-body" style="_height: 10px; min-height: 10px">
                        <div class="content-panel-help">客棧房間最遲退房時間，客棧房間最早入住時間，修改時間段不會影響以前的訂單。</div>
                        <table class="table content-panel-table">
                            <thead>
                            <tr>
                                <th>客棧名稱</th>
                                <th>申請狀態</th>
                                <th>過期時間</th>
                                <th>入住時間</th>
                                <th>退房時間</th>
                                <th class="night-audit"><span>夜審時間</span>
                                    <span class="iconfont icon-question-sign" style="font-size:14px ;margin-left: 2px;" data-toggle="tooltip" data-placement="right" data-container="#doc-center" data-html="true"  title='可自由設定或修改夜審時間，設定後在該時間段內的預定訂單是為當日住當日退，例如，當夜審時間為00:00--02:00，退房時間：12:00，客戶1號01:00下單預定，則該訂單的退房時間為1號12:00。其他預定訂單按正常時間退房處理；'></span>
                                    <div class="firstGuidePage hidden">
                                        <img src="/Public/uclbrt/image/night-audit-tw.png"/>
                                        <div class="roger"></div>
                                    </div>
                                </th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody id="roomTypeHotelList">
                            <empty name="navbarHotels">
                            <else/>
                                <volist name="navbarHotels" id="vo">
                                    <tr data-id="{$vo.hotelentity_id}" data-stop="{$vo.status}" >
                                        <td class="col-xs-2"><span>{$vo.name}</span></td>
                                        <td class="col-xs-2">
                                            <if condition= "$vo.usage eq 1">
                                                <span class="activehotel">開通</span>
                                            <elseif condition= "$vo.usage eq 2"/> <!--$vo.status-->
                                                <span>試用</span>
                                            <elseif condition= "$vo.usage eq 3"/>
                                                <span>測試</span>
                                            <elseif condition= "$vo.usage eq 4"/>
                                                <span>義賣</span>
                                            <else />
                                                <span>關閉</span>
                                            </if>
                                        </td>
                                        <td class="col-xs-2">
                                            <if condition= "$vo.enddate elt date('Y-m-d')">
                                                <span class="text-accent">{$vo.enddate}</span>
                                            <else />
                                                <span>{$vo.enddate}</span>
                                            </if>
                                        </td>
                                        <td class="col-xs-1">
                                            <span>{$vo.startTime}</span>
                                        </td>
                                        <td class="col-xs-1">
                                            <span>{$vo.endTime}</span>
                                        </td>
                                        <td class="col-xs-2">
                                            <if condition= "$vo['splitordertime'] eq '00:00'">
                                                <span>{$vo.splitordertime}</span>
                                            <else />
                                                <span>00:00 - {$vo.splitordertime}</span>
                                            </if>
                                        </td>
                                        <td class="col-xs-3" >
                                            <if condition= "$vo.status eq 0">
                                                <div class="btn-link text-accent submitStopConfirm">停用客棧</div>
                                                <div class="btn-link submitEditConfirm" style="margin-left: 8px;" data-name="{$vo.name}" data-id="{$vo.hotelentity_id}" data-end = "{$vo.endTime}" data-splittime = "{$vo.splitordertime}" data-start = "{$vo.startTime}" data-city="{$navbarHotels[$vo['hotelentity_id']]['city_id']}" data-district="{$navbarHotels[$vo['hotelentity_id']]['district_id']}" data-districtname="{$navbarHotels[$vo['hotelentity_id']]['districtName']}" data-toggle="modal" data-target="#editHotelModal" data-universaltimeid="{$navbarHotels[$vo['hotelentity_id']]['universaltime_id']}">修改客棧</div>
                                                <div class="btn-link submitStartConfirm hidden">啟用客棧</div>
                                            <else />
                                                <div class="btn-link text-accent submitStopConfirm hidden">停用客棧</div>
                                                <div class="btn-link submitEditConfirm hidden" style="margin-left: 8px;" data-name="{$vo.name}" data-id="{$vo.hotelentity_id}" data-end = "{$vo.endTime}" data-splittime = "{$vo.splitordertime}" data-start = "{$vo.startTime}" data-city="{$navbarHotels[$vo['hotelentity_id']]['city_id']}" data-district="{$navbarHotels[$vo['hotelentity_id']]['district_id']}" data-districtname="{$navbarHotels[$vo['hotelentity_id']]['districtName']}" data-toggle="modal" data-target="#editHotelModal" data-universaltimeid="{$navbarHotels[$vo['hotelentity_id']]['universaltime_id']}">修改客棧</div>
                                                <div class="btn-link submitStartConfirm ">啟用客棧</div>
                                            </if>
                                        </td>
                                    </tr>
                                </volist>
                            </empty>
                            <empty name="applyHotel">
                            <else />
                                <volist name="applyHotel" id="vo">
                                    <tr data-id="" data-stop="0">
                                        <td class="col-xs-2">{$vo.hotelname}</td>
                                        <td class="col-xs-2">
                                            <if condition= "$vo.status eq 0">
                                                <span class="text-accent">待審核</span>
                                            <else />
                                                <span>已拒絕</span>
                                            </if>
                                        </td>
                                        <td class="col-xs-2">
                                            <span></span>
                                        </td>
                                        <td class="col-xs-1">
                                            <span></span>
                                        </td>
                                        <td class="col-xs-1">
                                            <span></span>
                                        </td>
                                        <td class="col-xs-2">
                                            <span></span>
                                        </td>
                                        <td class="col-xs-3" >
                                        </td>
                                    </tr>
                                </volist>
                            </empty>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <!--end of doc-center-->
        </div>
        <!--end of doc body-->
    </div>
    <!--end of doc-->
    <!--停/啟用客棧的模态框-->
    <div class="modal fade" data-backdrop="static" id="disabledModal">
        <div class="modal-dialog sm-width">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <div class="modal-title">停/啟用客棧</div>
                </div>
                <div class="modal-body">
                    <form  class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-1 text-center" id="disabledHotels">
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" id="submitDiabledConfirm">確定</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--添加客棧的模态框-->
    <div class="modal fade" data-backdrop="static" id="addHotelModal">
        <div class="modal-dialog sm-width">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <div class="modal-title" style="line-height: inherit;"><span class="charity activehotel">添加義賣客棧</span><span  class="addHotel">添加認證客棧</span><span class="smalltip hidden" style="color: red;font-size: 12px;"> (美住工作人員會盡快為您審核)</span></div>
                </div>
                <div class="modal-body">
                    <form  class="form-horizontal form-sm">
                        <div class="form-group">
                            <label class="col-xs-3 control-label">客棧名稱:</label>
                            <div class="col-xs-5">
                                <input type="text" class="form-control" id="hotelName" autocomplete="off" placeholder="請輸入客棧名稱" value="" />
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">客棧時區:</label>
                            <div class="col-xs-9">
                                <select class="form-control" id="addRequestUniversalTime">
                                    <volist name="universalTimeList" id="universalTime">
                                        <option value="{$universalTime.universalTimeId}"  data-areacode="{$universalTime.areaCode}">({$universalTime.universalTimeUtc}){$universalTime.universalTimeName}</option>
                                    </volist>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">多元貨幣:</label>
                            <div class="col-xs-9">
                                <select class="form-control" id="addRequestMultiCurrency" disabled="disabled">
                                    <volist name="currencyInfo" id="currency">
                                        <option value="{$currency.id}">({$currency.standsymbol}) {$currency.name}/{$currency.usname} . {$currency.symbol}</option>
                                    </volist>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">所在城市:</label>
                            <div class="col-xs-8 cityContainer" id="cityContainer">
                                <div class="tag-selected-container">
                                </div>
                                <div class="tag-avaliable-container">
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">所在區域:</label>
                            <div class="col-xs-8 districtContainer" id="districtContainer">
                                <div class="tag-selected-container">
                                </div>
                                <div class="tag-avaliable-container">
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-11 col-xs-offset-1">
                                <div class="help-block inline-help-block inline-help-block-right"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" id="submitAddHotel">確定</button>
                                <!--<button type="button" class="btn-sm btn-primary btn-raised" id="submitAddCharity">添加義賣客棧</button>-->
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--編輯客棧的模态框-->
    <div class="modal fade" data-backdrop="static" id="editHotelModal">
        <div class="modal-dialog sm-width">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <div class="modal-title">編輯客棧</div>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal form-sm">
                        <div class="form-group">
                            <label class="col-xs-3 control-label">客棧名稱:</label>
                            <div class="col-xs-5">
                                <input type="text" class="form-control" id="editHotelName" autocomplete="off" placeholder="請輸入客棧名稱" value="" />
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block"></div>
                            </div>
                        </div>
                         <div class="form-group">
                            <label class="col-xs-3 control-label">客棧時區:</label>
                            <div class="col-xs-9">
                                <select class="form-control" id="editRequestUniversalTime">
                                    <volist name="universalTimeList" id="universalTime">
                                        <option value="{$universalTime.universalTimeId}"  data-areacode="{$universalTime.areaCode}">({$universalTime.universalTimeUtc}){$universalTime.universalTimeName}</option>
                                    </volist>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">所在城市:</label>
                            <div class="col-xs-8 cityContainer" id="editCityContainer">
                                <div class="tag-selected-container">
                                </div>
                                <div class="tag-avaliable-container">
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">所在區域:</label>
                            <div class="col-xs-8 districtContainer" id="editDistrictContainer">
                                <div class="tag-selected-container">
                                </div>
                                <div class="tag-avaliable-container">
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label"><span class="text-accent"></span>入住時間:</label>
                            <div class="col-xs-5">
                                <input type="text" class="form-control" id="requestStartTime" autocomplete="off" maxlength='5' placeholder="填寫入住時間 (格式 00:00)" value="" />
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block"></div>
                            </div>
                        </div>   
                        <div class="form-group">
                            <label class="col-xs-3 control-label"><span class="text-accent"></span>退房時間:</label>
                            <div class="col-xs-5">
                                <input type="text" class="form-control" id="requestEndTime" autocomplete="off" maxlength='5' placeholder="填寫退房時間 (格式 00:00)" value="" />
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label"><span class="text-accent"></span>夜審時間:</label>
                            <div class="col-xs-5">
                                <select class="form-control" id="select-splittime">
                                    <option value="00:00">00:00</option>
                                    <option value="01:00">01:00</option>
                                    <option value="02:00">02:00</option>
                                    <option value="03:00">03:00</option>
                                    <option value="04:00">04:00</option>
                                    <option value="05:00">05:00</option>
                                    <option value="06:00">06:00</option>
                                </select>
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block"></div>
                            </div>
                        </div> 
                    </form>
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" id="submitEditHotel">確定</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--刪除房型的模态框-->
    <div class="modal fade" data-backdrop="static" id="deleteModal">
        <div class="modal-dialog modal-confirm">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <div class="modal-title">刪除房型</div>
                </div>
                <div class="modal-body">
                    刪除&nbsp;<span class="roomType text-accent"></span>&nbsp;房型將刪除房間&nbsp;<span class="roomNum text-accent"></span>妳確定要刪除嗎？
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" id="submitDelete">確定</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--編輯房型的模态框-->
    <div class="modal fade" data-backdrop="static" id="editModal">
        <div class="modal-dialog sm-width">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <div class="modal-title">編輯房型</div>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal form-sm">
                        <div class="form-group">
                            <label class="col-xs-3 control-label">名稱:</label>
                            <div class="col-xs-5">
                                <input type="text" class="form-control" id="editName" autocomplete="off" placeholder="請輸入房型名稱" value="" />
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">房價:</label>
                            <div class="col-xs-5">
                                <input type="text" class="form-control" id="editPrice" autocomplete="off" placeholder="單位（{$hotelDefaultSymbol}）" value="" />
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block" style='line-height:18px'></div>
                            </div>
                        </div>
                        <if condition = "$isPayUclbrt eq true or $isFreeHotel eq true">
                            <div class="form-group">
                                <label class="col-xs-3 control-label">房型義賣價:</label>
                                <div class="col-xs-5">
                                    <input type="text" class="form-control" id="editCharityPrice" autocomplete="off" placeholder="單位（{$hotelDefaultSymbol}）" value="" />
                                </div>
                                <div class="col-xs-4">
                                    <div class="help-block" style='line-height:18px'></div>
                                </div>
                            </div>
                        </else>
                        </if>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">房間號:</label>
                            <div class="col-xs-9 roomNumContainer" id="editRoomNumContainer"></div>
                        </div>
                        <div class="row">
                            <div class="col-xs-9 col-xs-offset-3">
                                <div class="btn-sm btn-link" id="editRoomNumTrigger">+增加房間號</div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" id="submitEdit">確定</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--添加房型的模态框-->
    <div class="modal fade" data-backdrop="static" id="addModal">
        <div class="modal-dialog sm-width">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <div class="modal-title">添加房型</div>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal form-sm">
                        <div class="form-group">
                            <label class="col-xs-3 control-label">名稱:</label>
                            <div class="col-xs-5">
                                <input type="text" class="form-control" id="addName" autocomplete="off" placeholder="請輸入房型名稱" value="" />
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">房價:</label>
                            <div class="col-xs-5">
                                <input type="text" class="form-control" id="addPrice" autocomplete="off" placeholder="單位（{$hotelDefaultSymbol}）" value="" />
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block" style='line-height:18px'></div>
                            </div>
                        </div>
                        <if condition= "$isPayUclbrt eq true or $isFreeHotel eq true">
                                <div class="form-group">
                                <label class="col-xs-3 control-label">房型義賣價:</label>
                                <div class="col-xs-5">
                                    <input type="text" class="form-control" id="addCharityPrice" autocomplete="off" placeholder="單位（{$hotelDefaultSymbol}）" value="" />
                                </div>
                                <div class="col-xs-4">
                                    <div class="help-block" style='line-height:18px'></div>
                                </div>
                            </div>
                        <else />
                        </if>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">房間號:</label>
                            <div class="col-xs-9 roomNumContainer" id="addRoomNumContainer"></div>
                        </div>
                        <div class="row">
                            <div class="col-xs-9 col-xs-offset-3">
                                <div class="btn-sm btn-link" id="addRoomNumTrigger">+增加房間號</div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" id="submitAdd">確定</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <!--按日历設置房型價格模态框-->
    <div class="modal fade" data-backdrop="static" id="price_calendar">
        <div class="modal-dialog sm-width">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <div class="modal-title"><span class="price_calendar_title pull-left"></span><span>價格日歷</span><span class="price_calendar_last_room" id="price_calendar_last_room">尾房特賣</span></div>
                </div>
                <div class="modal-body">
                    
	                    <table>	                    
		                    <tr>
		                    <td class="calendar_wrap">                            
			                    <table id="calendar_months">
			                    </table>
                            </td>
                            <td class="calendar_wrap">
			                    <table>
				                    <thead class="calendar_header">
				                    	<tr><th>星期壹</th><th>星期二</th><th>星期三</th><th>星期四</th><th>星期五</th><th>星期六</th><th>星期日</th></tr>
				                    </thead>
				                    <tbody id="calendar_days"></tbody>
			                    </table>
		                    </td>
		                    </tr>
	                    </table>
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <span>單擊日期設置房價。</span><span class="err_info"></span>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- 價格設置弹窗 -->    
    <div class="modal fade" id="price_calendar_set">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal"><span>&times;</span></button>
                    <h4 class="modal-title">價格設置</h4>
                </div>
                <div class="modal-body">
                    <span>請輸入價格：{$hotelDefaultSymbol}</span><input tabindex="0" class="price_input" id="price_input" type="text"/> 
                </div>
                <div class="modal-footer">
                	<span id="set_price_info"></span>
                    <button id="set_price" type="button" class="btn-primary btn-raised ulite-js-btn ulite-js-ripple-effect">確定</button>
                </div>
            </div>
        </div>
    </div>
    <!--鎖掌櫃登錄模态框-->
    <div class="modal fade" data-backdrop="static" id="addLastRoomModel">
        <div class="modal-dialog sm-width">
            <div class="modal-content" id="price_last_room">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <div class="modal-title">尾房特賣</div>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal form-sm">
                        <div class="form-group">
                            <label class="col-xs-3 control-label">房型:</label>
                            <label class="col-xs-2 control-label" id="price_last_roomtype">单人間</label>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">預定立減:</label>
                            <div class="col-xs-8 input-group">
                                <div class="price-dot">{$hotelDefaultSymbol}</div>
                                <input type="text" class="form-control price-input" id="decRMB" autocomplete="off" value="" maxlength="6" placeholder="整數" />
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="border-box" id="datePickerContainer">
                                <div class="col-xs-2 col-without-padding">日期:</div>
                                <div class="col-xs-10 col-without-padding">
                                    <div id="datePicker"><span class="iconfont icon-calendar"></span>&nbsp;
                                    <span class="start">2017-02-01</span>&nbsp;~&nbsp;
                                    <span class="end">2017-02-27</span></div>
                                    <input id="datePickerInput" value="">
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">時間:</label>
                            <div class="col-xs-7 input-group">
                                <select class="form-control price-time-select" id="startTime">
                                    <option value="0">00:00</option>
                                    <option value="1">01:00</option>
                                    <option value="2">02:00</option>
                                    <option value="3">03:00</option>
                                    <option value="4">04:00</option>
                                    <option value="5">05:00</option>
                                    <option value="6">06:00</option>
                                    <option value="7">07:00</option>
                                    <option value="8">08:00</option>
                                    <option value="9">09:00</option>
                                    <option value="10">10:00</option>
                                    <option value="11">11:00</option>
                                    <option value="12">12:00</option>
                                    <option value="13">13:00</option>
                                    <option value="14">14:00</option>
                                    <option value="15">15:00</option>
                                    <option value="16">16:00</option>
                                    <option value="17">17:00</option>
                                    <option value="18">18:00</option>
                                    <option value="19">19:00</option>
                                    <option value="20">20:00</option>
                                    <option value="21">21:00</option>
                                    <option value="22">22:00</option>
                                    <option value="23">23:00</option>
                                </select>
                                <div class="price-time">━</div>
                                <select class="form-control price-time-select" id="endTime">
                                    <option value="1">01:00</option>
                                    <option value="2">02:00</option>
                                    <option value="3">03:00</option>
                                    <option value="4">04:00</option>
                                    <option value="5">05:00</option>
                                    <option value="6">06:00</option>
                                    <option value="7">07:00</option>
                                    <option value="8">08:00</option>
                                    <option value="9">09:00</option>
                                    <option value="10">10:00</option>
                                    <option value="11">11:00</option>
                                    <option value="12">12:00</option>
                                    <option value="13">13:00</option>
                                    <option value="14">14:00</option>
                                    <option value="15">15:00</option>
                                    <option value="16">16:00</option>
                                    <option value="17">17:00</option>
                                    <option value="18">18:00</option>
                                    <option value="19">19:00</option>
                                    <option value="20">20:00</option>
                                    <option value="21">21:00</option>
                                    <option value="22">22:00</option>
                                    <option value="23">23:00</option>
                                    <option value="24">24:00</option>
                                </select>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group" id="div-set-room-price">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right" id="set-room-price"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" id="submitLastRoom">壹鍵推廣</button>
                                <button type="button" class="btn-sm btn-accent btn-raised hidden" id="clearLastRoom">清除推廣</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-content hidden" id="bindCommunityContent">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <div class="modal-title">綁定集群</div>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal form-sm">
                        <div class="form-group">
                            <label class="col-xs-3 control-label">集群號:</label>
                            <div class="col-xs-9" id="communitiesContainer">
                                <div class="tag-selected-container">
                                </div>
                                <div class="tag-avaliable-container">
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" id="submitBindCommunity">綁定</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--同步鎖掌櫃房間模态框-->
    <div class="modal fade" data-backdrop="static" id="synQrmRoomModal">
        <div class="modal-dialog modal-confirm">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <div class="modal-title">同步鎖掌櫃房間</div>
                </div>
                <div class="modal-body">
                    該房間名稱與“鎖掌櫃”中的房間重名，推薦您進行數據同步。同步後入住客人將即刻收到二維碼房卡短信通知服務或打印RF卡。是否同步？
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" id="submitSynQrmRoom">確定</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--鎖掌櫃登錄模态框-->
    <div class="modal fade" data-backdrop="static" id="qrmLoginModel">
        <div class="modal-dialog sm-width">
            <div class="modal-content" id="loginContent">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <div class="modal-title">登錄鎖掌櫃</div>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal form-sm">
                        <div class="form-group">
                            <label class="col-xs-3 control-label">類型:</label>
                            <div class="col-xs-5">
                                <label class="radio-inline">
                                    <input type="radio" name="qrmLoginType" id="qrmLoginTypeMobile" checked value="1"> 手機
                                </label>
                                <label class="radio-inline">
                                    <input type="radio" name="qrmLoginType" id="qrmLoginTypeEmail" value="0"> 郵箱
                                </label>
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">帐号:</label>
                            <div class="col-xs-5">
                                <div id="qrmLoginMobileContainer">
                                    <include file="zh_tw:Public:Include_area_code" style='' direction='left' />
                                    <input type="text" class="form-control" id="qrmLoginNameMobile" autocomplete="off" value="" maxlength="50" placeholder="請輸入鎖掌櫃登錄手機號" />
                                </div>
                                <div id="qrmLoginEmailContainer" class='hidden'>
                                    <input type="text" class="form-control" id="qrmLoginNameEmail" autocomplete="off" value="" maxlength="50" placeholder="請輸入鎖掌櫃登錄郵箱" />
                                </div>
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">密碼:</label>
                            <div class="col-xs-5">
                                <input type="password" class="form-control" id="qrmLoginPassword" autocomplete="off" placeholder="請輸入鎖掌櫃登錄密碼" value="" />
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block"></div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" id="submitQrmLogin">確定</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-content hidden" id="bindCommunityContent">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <div class="modal-title">綁定集群</div>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal form-sm">
                        <div class="form-group">
                            <label class="col-xs-3 control-label">集群號:</label>
                            <div class="col-xs-9" id="communitiesContainer">
                                <div class="tag-selected-container">
                                </div>
                                <div class="tag-avaliable-container">
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" id="submitBindCommunity">綁定</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--同步鎖掌櫃房間模态框-->
    <div class="modal fade" data-backdrop="static" id="synQrmRoomModal">
        <div class="modal-dialog modal-confirm">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <div class="modal-title">同步鎖掌櫃房間</div>
                </div>
                <div class="modal-body">
                    該房間名稱與“鎖掌櫃”中的房間重名，推薦您進行數據同步。同步後入住客人將即刻收到二維碼房卡短信通知服務或打印RF卡。是否同步？
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" id="submitSynQrmRoom">確定</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 鐘點房初始化模态框 -->    
    <div class="modal fade" id="setHourRoomModal">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal"><span>&times;</span></button>
                   <div class="modal-title">鐘點房類型設置</div>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal form-sm">
                        <div class="form-group">
                            <label class="col-xs-1 control-label"></label>
                            <label class="control-label">鐘點房可預訂時間段</label>
                        </div>
                        <div class="form-group" style="margin-top: 0px;">
                            <label class="col-xs-2 control-label"></label>
                            <div class="col-xs-7 input-group">
                                <select class="form-control hour-time-select" id="hourRoomStartTime">
                                    <option value="">請選擇</option>
                                    <option value="0">00:00</option>
                                    <option value="1">01:00</option>
                                    <option value="2">02:00</option>
                                    <option value="3">03:00</option>
                                    <option value="4">04:00</option>
                                    <option value="5">05:00</option>
                                    <option value="6">06:00</option>
                                    <option value="7">07:00</option>
                                    <option value="8">08:00</option>
                                    <option value="9">09:00</option>
                                    <option value="10">10:00</option>
                                    <option value="11">11:00</option>
                                    <option value="12">12:00</option>
                                    <option value="13">13:00</option>
                                    <option value="14">14:00</option>
                                    <option value="15">15:00</option>
                                    <option value="16">16:00</option>
                                    <option value="17">17:00</option>
                                    <option value="18">18:00</option>
                                    <option value="19">19:00</option>
                                    <option value="20">20:00</option>
                                    <option value="21">21:00</option>
                                    <option value="22">22:00</option>
                                    <option value="23">23:00</option>
                                </select>
                                <div class="hour-time">━</div>
                                <select class="form-control hour-time-select" id="hourRoomEndTime">
                                    <option value="">請選擇</option>
                                </select>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <span id="set_init_hour_info"></span>
                    <button type="button" class="btn-primary btn-raised ulite-js-btn ulite-js-ripple-effect"  data-toggle="modal" data-target="#confirmRoomInitModal">確定</button>
                </div>
            </div>
        </div>
    </div>
    <!--添加鐘點房房型的模态框-->
    <div class="modal fade" data-backdrop="static" id="addHourRoomModal">
        <div class="modal-dialog sm-width">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <div class="modal-title">添加鐘點房</div>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal form-sm">
                        <div class="form-group">
                            <label class="col-xs-3 control-label">名稱:</label>
                            <div class="col-xs-5">
                                <select class="form-control" id="hourRoomTypeSelect"></select>
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">時間:</label>
                            <div class="col-xs-6 input-group">
                                <div class="price-hour">2小時</div>
                                <input type="text" class="form-control price-input" placeholder="入住兩小時價格">
                            </div>
                            <div class="help-block"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label"></label>
                            <div class="col-xs-6 input-group">
                                <div class="price-hour">4小時</div>
                                <input type="text" class="form-control price-input" placeholder="入住四小時價格">
                            </div>
                            <div class="help-block"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label"></label>
                            <div class="col-xs-6 input-group">
                                <div class="price-hour">6小時</div>
                                <input type="text" class="form-control price-input" placeholder="入住六小時價格">
                            </div>
                            <div class="help-block"></div>
                        </div>

                        <div class="form-group">
                            <label class="col-xs-3 control-label">房間號:</label>
                            <div class="col-xs-9 roomNumContainer" id="addHourRoomNumContainer"></div>
                        </div>
                        <div class="form-group hourRoomTypeGroup">
                            <label class="col-xs-3 control-label">可選房間:</label>
                            <div class="col-xs-9 hourRoomTypeContainer" id="hourRoomTypeAdd">
                                <div class="tag-avaliable-container" id="hourRoomTagContainer">
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" id="submitHourRoomAdd">確定</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--編輯房型的模态框-->
    <div class="modal fade" data-backdrop="static" id="editHourRoomModal">
        <div class="modal-dialog sm-width">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <div class="modal-title">編輯房型</div>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal form-sm">
                        <div class="form-group">
                            <label class="col-xs-3 control-label">名稱:</label>
                            <div class="col-xs-5">
                                <input type="text" class="form-control" disabled="disabled" id="editHourRoomName" autocomplete="off" value="" />
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">時間:</label>
                            <div class="col-xs-6 input-group">
                                <div class="price-hour">2小時</div>
                                <input type="text" class="form-control price-input" placeholder="入住兩小時價格">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label"></label>
                            <div class="col-xs-6 input-group">
                                <div class="price-hour">4小時</div>
                                <input type="text" class="form-control price-input" placeholder="入住四小時價格">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label"></label>
                            <div class="col-xs-6 input-group">
                                <div class="price-hour">6小時</div>
                                <input type="text" class="form-control price-input" placeholder="入住六小時價格">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">房間號:</label>
                            <div class="col-xs-9 roomNumContainer" id="editHourRoomNumContainer"></div>
                        </div>
                        <div class="form-group hourRoomTypeGroup">
                            <label class="col-xs-3 control-label">可選房間:</label>
                            <div class="col-xs-9 hourRoomTypeContainer" id="hourRoomTypeEdit">
                                <div class="tag-avaliable-container" id="editHourRoomTagContainer">
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" id="submitHourRoomEdit">確定</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--刪除房型的模态框-->
    <div class="modal fade" data-backdrop="static" id="deleteHourRoomModal">
        <div class="modal-dialog modal-confirm">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <div class="modal-title">刪除房型</div>
                </div>
                <div class="modal-body">
                    刪除&nbsp;<span class="roomType text-accent"></span>&nbsp;房型將刪除所有房間&nbsp;妳確定要刪除嗎？
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" id="submitHourRoomDelete">確定</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--初始化確認的模态框-->
    <div class="modal" id="confirmRoomInitModal" >
        <div class="modal-dialog modal-confirm">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title">確認初始化:</h4>
                </div>
                <div class="modal-body">              
                <li>是否確認初始化？機會只有一次！</li></div>
                <div class="modal-footer">
                    <span id="confirm-room-init" class="help-info"></span>
                    <button type="button" class="cancel-init" data-dismiss="modal">放棄</button>
                    <button type="button" class="confirm-init" id="init-hour-room">確認</button>
                </div>
            </div>
        </div>
    </div>
    <!--添加長租房的模态框-->
    <div class="modal fade" data-backdrop="static" id="addLongRoomModal">
        <div class="modal-dialog sm-width">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <div class="modal-title">添加房型</div>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal form-sm">
                        <div class="form-group">
                            <label class="col-xs-3 control-label">名稱:</label>
                            <div class="col-xs-5">
                                <select class="form-control" id="longRoomTypeSelect"></select>
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">房價:</label>
                            <div class="col-xs-5">
                                <input type="text" class="form-control" id="addLongRoomPrice" autocomplete="off" placeholder="單位({$hotelDefaultSymbol}/月)" value="" />
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block" style='line-height:18px'></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">房間號:</label>
                            <div class="col-xs-9 roomNumContainer" id="addLongRoomNumContainer"></div>
                        </div>
                        <div class="form-group longRoomTypeGroup">
                            <label class="col-xs-3 control-label">可選房間:</label>
                            <div class="col-xs-9 longRoomTypeContainer" id="longRoomTypeAdd">
                                <div class="tag-avaliable-container" id="longRoomTagContainer">
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" id="submitLongRoomAdd">確定</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--編輯長租房的模态框-->
    <div class="modal fade" data-backdrop="static" id="editLongRoomModal">
        <div class="modal-dialog sm-width">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <div class="modal-title">編輯房型</div>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal form-sm">
                        <div class="form-group">
                            <label class="col-xs-3 control-label">名稱:</label>
                            <div class="col-xs-5">
                                <input type="text" class="form-control" disabled="disabled" id="editLongRoomName" autocomplete="off" value="" />
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">房價:</label>
                            <div class="col-xs-5">
                                <input type="text" class="form-control" id="editLongRoomPrice" autocomplete="off" placeholder="單位({$hotelDefaultSymbol}/月)" value="" />
                            </div>
                            <div class="col-xs-4">
                                <div class="help-block" style='line-height:18px'></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-3 control-label">房間號:</label>
                            <div class="col-xs-9 roomNumContainer" id="editLongRoomNumContainer"></div>
                        </div>
                        <div class="form-group longRoomTypeGroup">
                            <label class="col-xs-3 control-label">可選房間:</label>
                            <div class="col-xs-9 longRoomTypeContainer" id="longRoomTypeEdit">
                                <div class="tag-avaliable-container" id="editLongRoomTagContainer">
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" id="submitLongRoomEdit">確定</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--刪除長租房的模态框-->
    <div class="modal fade" data-backdrop="static" id="deleteLongRoomModal">
        <div class="modal-dialog modal-confirm">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <div class="modal-title">刪除房型</div>
                </div>
                <div class="modal-body">
                    刪除&nbsp;<span class="roomType text-accent"></span>&nbsp;房型將刪除所有房間&nbsp;妳確定要刪除嗎？
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right"></div>
                                <button type="button" class="btn-sm btn-primary btn-raised" id="submitLongRoomDelete">確定</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--临時模板-->
    <script type="text/html" id="addRoomTemplate">
        <div class="addRoomNum">
            <input type="text" class="form-control roomNumInput" autocomplete="off" placeholder="" value="" maxlength='15' />
            <span class="iconfont icon-minus text-accent"></span>
        </div>
    </script>
    <!--可同步鎖掌櫃a标签模版-->
    <script type="text/html" id="synQrmRoom">
        <a href="#" class="roomNameTagTip accent" title='可同步'><span class="glyphicon iconfont icon-warningsign"></span></a>
    </script>
    <!--可同步鎖掌櫃a标签模版-->
    <script type="text/html" id="synedQrmRoom">
        <div href="#" class="roomNameTagTip success" title='已同步鎖掌櫃'><span class="glyphicon iconfont icon-mobile"></span></div>
    </script>
    <!--可同步鎖掌櫃a标签模版-->
    <script type="text/html" id="synedRFRoom">
        <div href="#" class="roomNameTagTip success" title='已同步RF卡'><span class="glyphicon glyphicon-credit-card"></span></div>
    </script>
    <!--可同步鎖掌櫃a标签模版-->
    <script type="text/html" id="synedQrbRoom">
        <div href="#" class="roomNameTagTip success" title='已同步藍牙卡'><span class="glyphicon glyphicon-credit-qrbcard"></span></div>
    </script>
    <!--停用啟用酒店模板-->
    <script type="text/html" id="templateDisabledHotel">
        <label class="switch ulite-js-switch ulite-js-ripple-effect">
            <input type="checkbox" class="switch-input" checked />
            <span class="switch-label nowrap-content text-left"></span>
        </label>
    </script>
    <!--临時模板-->
    <script type="text/html" id="addHourRoomTemplate">
        <div class="tag hour-room-tag">
            <span class="tag-text"></span>
            <span class="iconfont icon-minus text-accent tag-minus"></span>
        </div>
    </script>
    <!--临時模板-->
    <script type="text/html" id="addLongRoomTemplate">
        <div class="tag long-room-tag">
            <span class="tag-text"></span>
            <span class="iconfont icon-minus text-accent tag-minus"></span>
        </div>
    </script>
    <script type="text/html" id="templateHourRoom">
        <tr>
            <td class="col-xs-3"><span class="roomTypeName"></span></td>
            <td class="col-xs-4 roomNumbers">
                
            </td>
            <td class="col-xs-1">{$hotelDefaultSymbol}<span class="roomTypePrice"></span></td>
            <td class="col-xs-1">{$hotelDefaultSymbol}<span class="roomTypePrice"></span></td>
            <td class="col-xs-1">{$hotelDefaultSymbol}<span class="roomTypePrice"></span></td>
            <td class="col-xs-1 roomcount"></td>
            <td class="col-xs-2">
                <div class="btn-link editHourRoomBtn" data-toggle="modal" data-target="#editHourRoomModal">修改</div>
                <div class="btn-link deleteRoomBtn" data-toggle="modal" data-target="#deleteHourRoomModal">刪除</div>
            </td>
        </tr>
    </script>
    <script type="text/html" id="templateLongRoom">
        <tr>
            <td class="col-xs-3"><span class="roomTypeName"></span></td>
            <td class="col-xs-4 roomNumbers"></td>
            <td class="col-xs-1">{$hotelDefaultSymbol}<span class="roomTypePrice"></span></td>
            <td class="col-xs-1 roomcount"></td>
            <td class="col-xs-2">
                <div class="btn-link editLongRoomBtn" data-toggle="modal" data-target="#editLongRoomModal">修改</div>
                <div class="btn-link deleteLongRoomBtn" data-toggle="modal" data-target="#deleteLongRoomModal">刪除</div>
            </td>
        </tr>
    </script>
</block>
<block name="extendFootJs">
    <script type="text/javascript" src="/Public/uclbrt/ulite/city/citylist_zh_tw.min.js?rev=eb037c4769250fbfbd6d87f2b5ba2e15"></script>
    <script type="text/javascript" src="__PUBLIC__/jslib/moment.js/2.9.0/moment.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/jslib/bootstrap-daterangepicker/daterangepicker.js"></script>
    <script type="text/javascript" src="/Public/dist/Home/common_control.js?rev=3eaece6fb9364720bc065d082584c75ad"></script>
    <script type="text/javascript" src="/Public/dist/Home/RoomPage/calendar.js?rev=706a1a304bf22g22c374d0eb5e53f0b1d"></script>
    <script type="text/javascript" src="/Public/dist/Home/RoomPage/index.js?rev=706a1a304bf2232c374d0eb5e53f0b0d"></script>
    <script type="text/javascript" src="/Public/dist/Home/RoomPage/hourroom.js?rev=706a1a304bf2232c374d0eb5e53f0b2d"></script>
    <script type="text/javascript" src="/Public/dist/Home/RoomPage/longroom.js?rev=706a1a304bf2232c374d0eb5e53f0b2d"></script>
    <script type="text/javascript">
        <empty name="roomNames">
            window.init = [];
            <else />
            window.init = $.parseJSON('{:json_encode($roomNames);}');
        </empty>
        <empty name="qrmRoomNames">
            window.qrmInit = [];
            <else />
            window.qrmInit = $.parseJSON('{:json_encode($qrmRoomNames);}');
        </empty>
    </script>
</block>